package com.wxshare.sdk.autoconfigure;

import com.wxshare.sdk.config.WXShareProperties;
import com.wxshare.sdk.remoting.WXShareRemoting;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
@ConditionalOnClass(WXShareRemoting.class)
@EnableConfigurationProperties(WXShareProperties.class)
public class WXShareAutoConfigure {

    @Bean
    @ConditionalOnMissingBean
    WXShareRemoting wxShareRemoting(){
        return new WXShareRemoting();
    }
}
